﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;

namespace JXC.Core.Models
{
    /// <summary>
    /// 采购订单主文件
    ///  [ForeignKey("CaigouOrderId")]
    /// </summary>
    public class CaigouOrder
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { set; get; }//采购订单单号

        [ForeignKey("SupplierId")]
        public Guid SupplierID { set; get; }//供应商
        public DateTime OrderDate { set; get; }//订单日期
        public DateTime DelicerDate { set; get; }//交货日期
        public string Monetary { set; get; }//货币
        [ForeignKey("UserInfosId")]
        public Guid UserInfosId { set; get; }//采购人
        public string POD { set; get; }//交货地点
        public string Others { set; get; }//备注
        
        public Guid OperatorID { set; get; }//操作员
      
        public Guid? ExaminerID { set; get; }//审核人
        public int ExamineState { get; set; }//审核状态
        public int Deal { get; set; }//是否完成
        public UserInfos UserInfos { get; set; }
        public virtual UserInfos Operator { get; set; }
        public virtual UserInfos Examiner { get; set; }
        public Supplier Supplier { get; set; }

        //public List<CaigouEnter> CaigouEnters { get; set; }
        public List<PaidDetail>   PaidDetails { get; set; }
       


    }
}
